package com.b1502.store2.view;

import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.b1502.store2.R;

/**
 * 1.类的用途：
 * 2.zhaoayuan
 * 3.@date 2017/02/28 20:06
 * 4.用途:
 */
public class TopTitleBar extends RelativeLayout{

    private TextView bar_back;

    public TopTitleBar(Context context) {
        super(context);
    }

    public TopTitleBar(Context context, AttributeSet attrs) {
        super(context, attrs);
        View view = LayoutInflater.from(context).inflate(R.layout.store_bar,this);
        bar_back = (TextView) view.findViewById(R.id.bar_back);
        TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.TopTitleBar);
        typedArray.recycle();
    }
    public void setTopTitleBarLeftBackOnclicklistener(OnClickListener listener){
        bar_back.setOnClickListener(listener);
    }
}
